import 'package:dio/dio.dart';
import 'package:flutter/material.dart';

/// 小组动态相关
class ReqMoment {
  final Dio _dio;

  ReqMoment(this._dio);

  /// 获取小组动态列表
  Future<Response> getMoments() {
    return _dio.get('/moment/list', queryParameters: {});
  }

  /// 发布动态
  Future<Response> publishMoment({
    /// 验证码
    @required String code,

    /// 邮箱
    @required String mail,
  }) {
    return _dio
        .post('/verification/mail/check', data: {"code": code, "mail": mail});
  }
}
